import sympy
import numpy as np
from sympy import *
from sympy.abc import x,y,z,f
f = x**2+3*x*y+y**2
print(diff(f,x))

print(diff(f,y))
fx = diff(f,x)
print(fx.evalf(subs={x:1,y:2}))
fy = diff(f,y)
print(fy.evalf(subs={x:1,y:2}))
